3.1.25 \(\int (c+d x) \text {csch}(a+b x) \, dx\) [25]

Optimal. Leaf size=50 \[ -\frac {2 (c+d x) \tanh ^{-1}\left (e^{a+b x}\right )}{b}-\frac {d \text {PolyLog}\left (2,-e^{a+b x}\right )}{b^2}+\frac {d \text {PolyLog}\left (2,e^{a+b x}\right )}{b^2} \]

[Out]

-2*(d*x+c)*arctanh(exp(b*x+a))/b-d*polylog(2,-exp(b*x+a))/b^2+d*polylog(2,exp(b*x+a))/b^2

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 50, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 3, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {4267, 2317, 2438} \begin {gather*} -\frac {d \text {Li}_2\left (-e^{a+b x}\right )}{b^2}+\frac {d \text {Li}_2\left (e^{a+b x}\right )}{b^2}-\frac {2 (c+d x) \tanh ^{-1}\left (e^{a+b x}\right )}{b} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(c + d*x)*Csch[a + b*x],x]

[Out]

(-2*(c + d*x)*ArcTanh[E^(a + b*x)])/b - (d*PolyLog[2, -E^(a + b*x)])/b^2 + (d*PolyLog[2, E^(a + b*x)])/b^2

Rule 2317

Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Dist[1/(d*e*n*Log[F]), Subst[Int
[Log[a + b*x]/x, x], x, (F^(e*(c + d*x)))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]

Rule 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 4267

Int[csc[(e_.) + (Complex[0, fz_])*(f_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[-2*(c + d*x)^m*(Ar
cTanh[E^((-I)*e + f*fz*x)]/(f*fz*I)), x] + (-Dist[d*(m/(f*fz*I)), Int[(c + d*x)^(m - 1)*Log[1 - E^((-I)*e + f*
fz*x)], x], x] + Dist[d*(m/(f*fz*I)), Int[(c + d*x)^(m - 1)*Log[1 + E^((-I)*e + f*fz*x)], x], x]) /; FreeQ[{c,
 d, e, f, fz}, x] && IGtQ[m, 0]

Rubi steps

\begin {align*} \int (c+d x) \text {csch}(a+b x) \, dx &=-\frac {2 (c+d x) \tanh ^{-1}\left (e^{a+b x}\right )}{b}-\frac {d \int \log \left (1-e^{a+b x}\right ) \, dx}{b}+\frac {d \int \log \left (1+e^{a+b x}\right ) \, dx}{b}\\ &=-\frac {2 (c+d x) \tanh ^{-1}\left (e^{a+b x}\right )}{b}-\frac {d \text {Subst}\left (\int \frac {\log (1-x)}{x} \, dx,x,e^{a+b x}\right )}{b^2}+\frac {d \text {Subst}\left (\int \frac {\log (1+x)}{x} \, dx,x,e^{a+b x}\right )}{b^2}\\ &=-\frac {2 (c+d x) \tanh ^{-1}\left (e^{a+b x}\right )}{b}-\frac {d \text {Li}_2\left (-e^{a+b x}\right )}{b^2}+\frac {d \text {Li}_2\left (e^{a+b x}\right )}{b^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C] Result contains complex when optimal does not.
time = 0.06, size = 174, normalized size = 3.48 \begin {gather*} -\frac {c \log \left (\cosh \left (\frac {a}{2}+\frac {b x}{2}\right )\right )}{b}+\frac {c \log \left (\sinh \left (\frac {a}{2}+\frac {b x}{2}\right )\right )}{b}+\frac {d \left (-a \log \left (\tanh \left (\frac {1}{2} (a+b x)\right )\right )-i \left ((i a+i b x) \left (\log \left (1-e^{i (i a+i b x)}\right )-\log \left (1+e^{i (i a+i b x)}\right )\right )+i \left (\text {PolyLog}\left (2,-e^{i (i a+i b x)}\right )-\text {PolyLog}\left (2,e^{i (i a+i b x)}\right )\right )\right )\right )}{b^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x)*Csch[a + b*x],x]

[Out]

-((c*Log[Cosh[a/2 + (b*x)/2]])/b) + (c*Log[Sinh[a/2 + (b*x)/2]])/b + (d*(-(a*Log[Tanh[(a + b*x)/2]]) - I*((I*a
 + I*b*x)*(Log[1 - E^(I*(I*a + I*b*x))] - Log[1 + E^(I*(I*a + I*b*x))]) + I*(PolyLog[2, -E^(I*(I*a + I*b*x))]
- PolyLog[2, E^(I*(I*a + I*b*x))]))))/b^2

________________________________________________________________________________________

Maple [A]
time = 0.51, size = 60, normalized size = 1.20

method result size
derivativedivides \(\frac {\frac {d \left (2 \dilog \left ({\mathrm e}^{-b x -a}\right )-\frac {\dilog \left ({\mathrm e}^{-2 b x -2 a}\right )}{2}\right )}{b}+\frac {2 d a \arctanh \left ({\mathrm e}^{b x +a}\right )}{b}-2 c \arctanh \left ({\mathrm e}^{b x +a}\right )}{b}\) \(60\)
default \(\frac {\frac {d \left (2 \dilog \left ({\mathrm e}^{-b x -a}\right )-\frac {\dilog \left ({\mathrm e}^{-2 b x -2 a}\right )}{2}\right )}{b}+\frac {2 d a \arctanh \left ({\mathrm e}^{b x +a}\right )}{b}-2 c \arctanh \left ({\mathrm e}^{b x +a}\right )}{b}\) \(60\)
risch \(-\frac {2 c \arctanh \left ({\mathrm e}^{b x +a}\right )}{b}+\frac {d \ln \left (1-{\mathrm e}^{b x +a}\right ) x}{b}+\frac {d \ln \left (1-{\mathrm e}^{b x +a}\right ) a}{b^{2}}+\frac {d \polylog \left (2, {\mathrm e}^{b x +a}\right )}{b^{2}}-\frac {d \ln \left ({\mathrm e}^{b x +a}+1\right ) x}{b}-\frac {d \ln \left ({\mathrm e}^{b x +a}+1\right ) a}{b^{2}}-\frac {d \polylog \left (2, -{\mathrm e}^{b x +a}\right )}{b^{2}}+\frac {2 d a \arctanh \left ({\mathrm e}^{b x +a}\right )}{b^{2}}\) \(124\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d*x+c)*csch(b*x+a),x,method=_RETURNVERBOSE)

[Out]

1/b*(d/b*(2*dilog(exp(-b*x-a))-1/2*dilog(exp(-2*b*x-2*a)))+2*d/b*a*arctanh(exp(b*x+a))-2*c*arctanh(exp(b*x+a))
)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*csch(b*x+a),x, algorithm="maxima")

[Out]

-c*(log(e^(-b*x - a) + 1)/b - log(e^(-b*x - a) - 1)/b) + 2*d*(integrate(1/2*x/(e^(b*x + a) + 1), x) + integrat
e(1/2*x/(e^(b*x + a) - 1), x))

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 119 vs. \(2 (45) = 90\).
time = 0.34, size = 119, normalized size = 2.38 \begin {gather*} \frac {d {\rm Li}_2\left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right )\right ) - d {\rm Li}_2\left (-\cosh \left (b x + a\right ) - \sinh \left (b x + a\right )\right ) - {\left (b d x + b c\right )} \log \left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right ) + 1\right ) + {\left (b c - a d\right )} \log \left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right ) - 1\right ) + {\left (b d x + a d\right )} \log \left (-\cosh \left (b x + a\right ) - \sinh \left (b x + a\right ) + 1\right )}{b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*csch(b*x+a),x, algorithm="fricas")

[Out]

(d*dilog(cosh(b*x + a) + sinh(b*x + a)) - d*dilog(-cosh(b*x + a) - sinh(b*x + a)) - (b*d*x + b*c)*log(cosh(b*x
 + a) + sinh(b*x + a) + 1) + (b*c - a*d)*log(cosh(b*x + a) + sinh(b*x + a) - 1) + (b*d*x + a*d)*log(-cosh(b*x
+ a) - sinh(b*x + a) + 1))/b^2

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (c + d x\right ) \operatorname {csch}{\left (a + b x \right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*csch(b*x+a),x)

[Out]

Integral((c + d*x)*csch(a + b*x), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d*x+c)*csch(b*x+a),x, algorithm="giac")

[Out]

integrate((d*x + c)*csch(b*x + a), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {c+d\,x}{\mathrm {sinh}\left (a+b\,x\right )} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c + d*x)/sinh(a + b*x),x)

[Out]

int((c + d*x)/sinh(a + b*x), x)

________________________________________________________________________________________